/**
 * 仓库
 *
 * @author sxf
 * @email sxf02615@163.com
 * @date 2025/1/15
 */
package com.sxf.crm.repository;


import com.sxf.crm.entity.Department;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DepartmentRepository extends JpaRepository<Department, Long> {
    Page<Department> findByNameContaining(String name, Pageable pageable);
    boolean existsByName(String name);
    List<Department> findByNameContaining(String name);
    List<Department> findByParentId(Long parentId);
} 